package com.markhsiu.core.constant;

public class ToolUtils {

	

	public static boolean isNotEmpty(final Object[] array) {
		return array != null && array.length > 0;
	}
	
	
	public static boolean isEmpty(final byte[] bytes) {
		return bytes == null || bytes.length == 0;
	}
	
	 /**
     * 判断字符串是否不为空
     * @param str
     * @return
     */
    public static boolean isNotEmpty(String str) {
        return !(null == str || "".equals(str.trim()));
    }

    /**
     * 判断字符串是否为空
     * @param str
     * @return
     */
    public static boolean isEmpty(String str) {
        return null == str || "".equals(str.trim());
    }

    

    public static boolean isInteger(String str){
        if(isEmpty(str)) {
            return false;
        }
        return str.matches("[0-9]+") ;
    }
 
}
